package com.devoneilers.androidworldfactbook;

import android.app.Activity;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;

public class FactDisplayActivity extends Activity
{
	
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		Bundle extras = getIntent().getExtras();
		if (extras != null)
		{
			String fact = extras.getString("FACT_RETRIEVED");
			
	        // Create the text view
	        TextView textView = new TextView(this);
	        textView.setTextSize(15);
	        textView.setMovementMethod(ScrollingMovementMethod.getInstance());

	        textView.setText(fact);
	        setContentView(textView);

		}
		else
		{
			TextView textView = new TextView(this);
	        textView.setTextSize(40);
			textView.setText("Didn't work");
	        setContentView(textView);

		}
		


        
        
	}
}
